<!--联系我们-->
<template>
  <div class="all bg1">
    <template v-for="(item, index) in lists">
      
      <div class="cell bt1" v-bind:key="index" @click="cellClick(item)">
        <text class="font30 text2 all">{{item.title}}</text>
        <text class="font26 text3">{{item.text}}</text>
        <LImage class="img-arrow" :src="Config.img('jiantou_hui.png')"></LImage>      
      </div>
      <div class="line line1" v-bind:key="'line'+index"></div>
    </template>
  </div>
</template>

<style src="@/_css/style.css" ></style>
<style scoped>
.cell {
  flex-direction: row;
  align-items: center;
  height:118px;

  padding-left: 40px;
  padding-right: 40px;
}
.line{
  height: 1px;
  margin-left: 40px;
}
.img-arrow {
  width: 16px;
  height: 26px;
  margin-left: 20px;
}
</style>

<script>

import jnavigator from "@/_js/navigator";
import jmodal from "@/_js/modal";
import jconfig from "@/_js/config";

const clipboard = weex.requireModule("clipboard");
const weexFunction = weex.requireModule("WeexFunction");

import I18N from "@/_i18n/i18n";
var T = I18N.t;
weexFunction.setTitle(T('联系我们'));

export default {
  
  data() {
    return {
      T:T,
      Config:jconfig,

      lists:[{'title':T("官网"), 
            'text':'https://www.vtrading.com'},

            // {'title':T("微信"), 
            // 'text':'yinggewb',
            // 'type':'dialog',
            // 'url':'mine/DialogWx'},

            {'title':"Telegram", 
            'text':'vtradingofficial', 
            'tipe':T('复制Telegram成功')},

            {'title':"Twitter", 
            'text':'https://x.com/vtradingglobal'},

            {'title':T("邮箱"), 
            'text':'support@vtrading.com', 
            'tipe':T('复制邮箱成功')},],
    };
  },

  created(){
  },
  
  methods: {

    /********************************** 点击事件*/
    //列表点击
    cellClick(item) {
      
      //复制类型
      if (item.tipe) {
        jmodal.toast(item.tipe);
        clipboard.setString(item.text);
        return;
      }
      
      if (item.type == 'dialog') {
        jnavigator.openDialog(item.url);
        return;
      }
      
      weexFunction.showWebUrl(item.text);
    },
  }
};

</script>
